Rで生物多様性情報を取得する

第113回Tokyo.R

伊東宏樹

2024-06-08

自己紹介

  • 氏名: 伊東宏樹

  • 3月まで森林総合研究所勤務

  • 4月から個人事業主(伊東生態統計研究室

  • データ解析、執筆・翻訳、研修講師などお引き受けいたします。

Kanazawa.R

  • 石川県金沢市でのR勉強会
  • いままでないようなので、やってみることにしました。
  • 6月29日開催(現地+オンライン)
  • 詳細はconnpassのイベントページ Kanazawa.R #1 にて

生物多様性

  • 遺伝子・種・生態系での多様性

  • 生態系サービス(食料・水供給、気候調整、レクリエーションなど)の基盤

  • 企業活動においても、TNFD(自然関連財務情報開示タスクフォース)などで生物多様性保全への貢献の報告が求められるように

GBIF

GBIF—the Global Biodiversity Information Facility—is an international network and data infrastructure funded by the world’s governments and aimed at providing anyone, anywhere, open access to data about all types of life on Earth.

(What is GBIF?)

  • 地球上の生物の存在記録(標本や観察データなど)の集積と公開

rgbifパッケージ

例(コウノトリ)

2005年に野生復帰、現在も絶滅危惧種

コウノトリはどこにいた(いる)のか

  1. GBIFのデータを取得
  2. 地図化

データ取得

species_data <- name_backbone("Ciconia boyciana")  # コウノトリの学名
taxon_key <- species_data$usageKey
occ_info <- occ_download(pred("taxonKey", taxon_key),  # コウノトリ
                         pred("country", "JP"),        # 日本で
                         pred("hasCoordinate", TRUE))  # 位置情報のあるもの
(meta <- occ_download_meta(occ_info))
<<gbif download metadata>>
  Status: RUNNING
  DOI: 10.15468/dl.nzft4d
  Format: DWCA
  Download key: 0056521-240506114902167
  Created: 2024-06-03T03:36:48.498+00:00
  Modified: 2024-06-03T03:36:48.956+00:00
  Download link: https://api.gbif.org/v1/occurrence/download/request/0056521-240506114902167.zip
  Total records: <NA>

引用情報

GBIFデータの使用にあたってはDOIの引用が義務となっています。

gbif_citation(meta$key)
$download
[1] "GBIF Occurrence Download https://doi.org/10.15468/dl.nzft4d Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2024-06-03"

$datasets
NULL

データのダウンロード

occ_download_wait(occ_info)
<<gbif download metadata>>
  Status: SUCCEEDED
  DOI: 10.15468/dl.nzft4d
  Format: DWCA
  Download key: 0056521-240506114902167
  Created: 2024-06-03T03:36:48.498+00:00
  Modified: 2024-06-03T03:37:35.690+00:00
  Download link: https://api.gbif.org/v1/occurrence/download/request/0056521-240506114902167.zip
  Total records: 624
x <- occ_download_get(occ_info)
df <- occ_download_import(x)

地図表示